using System;
using System.Collections.Generic;
using System.Text;
using SdlDotNet.Graphics.Sprites;
using SdlDotNet.Graphics;
using System.Drawing;

namespace SnakeCharp.UI
{
    public class Menu : Sprite
    {
        private UIFont title;

        public Menu()
            : base(new Surface(Configurations.ScreenWidth, Configurations.ScreenHeight, Configurations.BitsPerPixel, true))
        {
            //this.title = new UIFont("|-------MENU------|\n 1. Start Game \n2. View HiScore\n3. Quit (Press ESC)", 20);
            this.title = new UIFont("|-------MENU------| 1. Start Game. View HiScore. Quit (Press ESC)", 20);
            this.title.Color = Color.YellowGreen;
            this.title.X = 300;
            this.title.Y = 250;
            this.title.TextWidth = 400;

            //Draw the text on the local Surface
            this.Surface.Blit(this.title);
        }

        /// <summary>
        /// Updates the specified UI.
        /// </summary>
        /// <param name="inputController">The input controller.</param>
        /// <param name="gameState">State of the game.</param>
        public void Update(Controller inputController, ref SnakeCharp.Game.GameState gameState)
        {
            //Act oppon pressed key
            if (inputController.CheckKey(SdlDotNet.Input.Key.One))
            {
                gameState = SnakeCharp.Game.GameState.Game;
            }
        }
    }
}
